﻿using furion.blog.Domain.Shared.Dto.Dept;
using furion.blog.Domain.Shared.Vo.Dept;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Application.Contracts
{
    public interface IDeptService
    {

        /// <summary>
        /// 部门树
        /// </summary>
        /// <param name="parentId">父级ID</param>
        /// <returns></returns>
        Task<object> Tree(long? parentId);

        /// <summary>
        /// 详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<DeptDetailVO> Detail(long id);

        /// <summary>
        /// 新增部门
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task Add(DeptCreateDto dto);

        /// <summary>
        /// 更新部门信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task Update(DeptUpdateDto dto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task Delete(long id,long userId);


    }
}
